<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<!doctype html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />

    <title>nexuscli.test.nexuscli_test API documentation</title>
    <meta name="description" content="" />

  <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300' rel='stylesheet' type='text/css'>
  
  <style type="text/css">
  
* {
  box-sizing: border-box;
}
/*! normalize.css v1.1.1 | MIT License | git.io/normalize */

/* ==========================================================================
   HTML5 display definitions
   ========================================================================== */

/**
 * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
 */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
    display: block;
}

/**
 * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
 */

audio,
canvas,
video {
    display: inline-block;
    *display: inline;
    *zoom: 1;
}

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */

audio:not([controls]) {
    display: none;
    height: 0;
}

/**
 * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
 * Known issue: no IE 6 support.
 */

[hidden] {
    display: none;
}

/* ==========================================================================
   Base
   ========================================================================== */

/**
 * 1. Prevent system color scheme's background color being used in Firefox, IE,
 *    and Opera.
 * 2. Prevent system color scheme's text color being used in Firefox, IE, and
 *    Opera.
 * 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
 *    `em` units.
 * 4. Prevent iOS text size adjust after orientation change, without disabling
 *    user zoom.
 */

html {
    background: #fff; /* 1 */
    color: #000; /* 2 */
    font-size: 100%; /* 3 */
    -webkit-text-size-adjust: 100%; /* 4 */
    -ms-text-size-adjust: 100%; /* 4 */
}

/**
 * Address `font-family` inconsistency between `textarea` and other form
 * elements.
 */

html,
button,
input,
select,
textarea {
    font-family: sans-serif;
}

/**
 * Address margins handled incorrectly in IE 6/7.
 */

body {
    margin: 0;
}

/* ==========================================================================
   Links
   ========================================================================== */

/**
 * Address `outline` inconsistency between Chrome and other browsers.
 */

a:focus {
    outline: thin dotted;
}

/**
 * Improve readability when focused and also mouse hovered in all browsers.
 */

a:active,
a:hover {
    outline: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/**
 * Address font sizes and margins set differently in IE 6/7.
 * Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
 * and Chrome.
 */

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

h2 {
    font-size: 1.5em;
    margin: 0.83em 0;
}

h3 {
    font-size: 1.17em;
    margin: 1em 0;
}

h4 {
    font-size: 1em;
    margin: 1.33em 0;
}

h5 {
    font-size: 0.83em;
    margin: 1.67em 0;
}

h6 {
    font-size: 0.67em;
    margin: 2.33em 0;
}

/**
 * Address styling not present in IE 7/8/9, Safari 5, and Chrome.
 */

abbr[title] {
    border-bottom: 1px dotted;
}

/**
 * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
 */

b,
strong {
    font-weight: bold;
}

blockquote {
    margin: 1em 40px;
}

/**
 * Address styling not present in Safari 5 and Chrome.
 */

dfn {
    font-style: italic;
}

/**
 * Address differences between Firefox and other browsers.
 * Known issue: no IE 6/7 normalization.
 */

hr {
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    height: 0;
}

/**
 * Address styling not present in IE 6/7/8/9.
 */

mark {
    background: #ff0;
    color: #000;
}

/**
 * Address margins set differently in IE 6/7.
 */

p,
pre {
    margin: 1em 0;
}

/**
 * Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
 */

code,
kbd,
pre,
samp {
    font-family: monospace, serif;
    _font-family: 'courier new', monospace;
    font-size: 1em;
}

/**
 * Improve readability of pre-formatted text in all browsers.
 */

pre {
    white-space: pre;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/**
 * Address CSS quotes not supported in IE 6/7.
 */

q {
    quotes: none;
}

/**
 * Address `quotes` property not supported in Safari 4.
 */

q:before,
q:after {
    content: '';
    content: none;
}

/**
 * Address inconsistent and variable font size in all browsers.
 */

small {
    font-size: 80%;
}

/**
 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
 */

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* ==========================================================================
   Lists
   ========================================================================== */

/**
 * Address margins set differently in IE 6/7.
 */

dl,
menu,
ol,
ul {
    margin: 1em 0;
}

dd {
    margin: 0 0 0 40px;
}

/**
 * Address paddings set differently in IE 6/7.
 */

menu,
ol,
ul {
    padding: 0 0 0 40px;
}

/**
 * Correct list images handled incorrectly in IE 7.
 */

nav ul,
nav ol {
    list-style: none;
    list-style-image: none;
}

/* ==========================================================================
   Embedded content
   ========================================================================== */

/**
 * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
 * 2. Improve image quality when scaled in IE 7.
 */

img {
    border: 0; /* 1 */
    -ms-interpolation-mode: bicubic; /* 2 */
}

/**
 * Correct overflow displayed oddly in IE 9.
 */

svg:not(:root) {
    overflow: hidden;
}

/* ==========================================================================
   Figures
   ========================================================================== */

/**
 * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
 */

figure {
    margin: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */

/**
 * Correct margin displayed oddly in IE 6/7.
 */

form {
    margin: 0;
}

/**
 * Define consistent border, margin, and padding.
 */

fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}

/**
 * 1. Correct color not being inherited in IE 6/7/8/9.
 * 2. Correct text not wrapping in Firefox 3.
 * 3. Correct alignment displayed oddly in IE 6/7.
 */

legend {
    border: 0; /* 1 */
    padding: 0;
    white-space: normal; /* 2 */
    *margin-left: -7px; /* 3 */
}

/**
 * 1. Correct font size not being inherited in all browsers.
 * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
 *    and Chrome.
 * 3. Improve appearance and consistency in all browsers.
 */

button,
input,
select,
textarea {
    font-size: 100%; /* 1 */
    margin: 0; /* 2 */
    vertical-align: baseline; /* 3 */
    *vertical-align: middle; /* 3 */
}

/**
 * Address Firefox 3+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */

button,
input {
    line-height: normal;
}

/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
 * Correct `select` style inheritance in Firefox 4+ and Opera.
 */

button,
select {
    text-transform: none;
}

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
 *    Known issue: inner spacing remains in IE 6.
 */

button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: button; /* 2 */
    cursor: pointer; /* 3 */
    *overflow: visible;  /* 4 */
}

/**
 * Re-set default cursor for disabled elements.
 */

button[disabled],
html input[disabled] {
    cursor: default;
}

/**
 * 1. Address box sizing set to content-box in IE 8/9.
 * 2. Remove excess padding in IE 8/9.
 * 3. Remove excess padding in IE 7.
 *    Known issue: excess padding remains in IE 6.
 */

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
    *height: 13px; /* 3 */
    *width: 13px; /* 3 */
}

/**
 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
 *    (include `-moz` to future-proof).
 */

input[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box; /* 2 */
    box-sizing: content-box;
}

/**
 * Remove inner padding and search cancel button in Safari 5 and Chrome
 * on OS X.
 */

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/**
 * Remove inner padding and border in Firefox 3+.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/**
 * 1. Remove default vertical scrollbar in IE 6/7/8/9.
 * 2. Improve readability and alignment in all browsers.
 */

textarea {
    overflow: auto; /* 1 */
    vertical-align: top; /* 2 */
}

/* ==========================================================================
   Tables
   ========================================================================== */

/**
 * Remove most spacing between table cells.
 */

table {
    border-collapse: collapse;
    border-spacing: 0;
}

  </style>

  <style type="text/css">
  
  html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
  }
  body {
    background: #fff;
    font-family: "Source Sans Pro", "Helvetica Neueue", Helvetica, sans;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6em;
  }
  #content {
    width: 70%;
    max-width: 850px;
    float: left;
    padding: 30px 60px;
    border-left: 1px solid #ddd;
  }
  #sidebar {
    width: 25%;
    float: left;
    padding: 30px;
    overflow: hidden;
  }
  #nav {
    font-size: 130%;
    margin: 0 0 15px 0;
  }

  #top {
    display: block;
    position: fixed;
    bottom: 5px;
    left: 5px;
    font-size: .85em;
    text-transform: uppercase;
  }

  #footer {
    font-size: .75em;
    padding: 5px 30px;
    border-top: 1px solid #ddd;
    text-align: right;
  }
    #footer p {
      margin: 0 0 0 30px;
      display: inline-block;
    }

  h1, h2, h3, h4, h5 {
    font-weight: 300;
  }
  h1 {
    font-size: 2.5em;
    line-height: 1.1em;
    margin: 0 0 .50em 0;
  }

  h2 {
    font-size: 1.75em;
    margin: 1em 0 .50em 0;
  }

  h3 {
    margin: 25px 0 10px 0;
  }

  h4 {
    margin: 0;
    font-size: 105%;
  }

  a {
    color: #058;
    text-decoration: none;
    transition: color .3s ease-in-out;
  }

  a:hover {
    color: #e08524;
    transition: color .3s ease-in-out;
  }

  pre, code, .mono, .name {
    font-family: "Ubuntu Mono", "Cousine", "DejaVu Sans Mono", monospace;
  }

  .title .name {
    font-weight: bold;
  }
  .section-title {
    margin-top: 2em;
  }
  .ident {
    color: #900;
  }

  code {
    background: #f9f9f9;
  } 

  pre {
    background: #fefefe;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 0 #f3f3f3;
    margin: 0 30px;
    padding: 15px 30px;
  }

  .codehilite {
    margin: 0 30px 10px 30px;
  }

    .codehilite pre {
      margin: 0;
    }
    .codehilite .err { background: #ff3300; color: #fff !important; } 

  table#module-list {
    font-size: 110%;
  }

    table#module-list tr td:first-child {
      padding-right: 10px;
      white-space: nowrap;
    }

    table#module-list td {
      vertical-align: top;
      padding-bottom: 8px;
    }

      table#module-list td p {
        margin: 0 0 7px 0;
      }

  .def {
    display: table;
  }

    .def p {
      display: table-cell;
      vertical-align: top;
      text-align: left;
    }

    .def p:first-child {
      white-space: nowrap;
    }

    .def p:last-child {
      width: 100%;
    }


  #index {
    list-style-type: none;
    margin: 0;
    padding: 0;
  }
    ul#index .class_name {
      /* font-size: 110%; */
      font-weight: bold;
    }
    #index ul {
      margin: 0;
    }

  .item {
    margin: 0 0 15px 0;
  }

    .item .class {
      margin: 0 0 25px 30px;
    }

      .item .class ul.class_list {
        margin: 0 0 20px 0;
      }

    .item .name {
      background: #fafafa;
      margin: 0;
      font-weight: bold;
      padding: 5px 10px;
      border-radius: 3px;
      display: inline-block;
      min-width: 40%;
    }
      .item .name:hover {
        background: #f6f6f6;
      }

    .item .empty_desc {
      margin: 0 0 5px 0;
      padding: 0;
    }

    .item .inheritance {
      margin: 3px 0 0 30px;
    }

    .item .inherited {
      color: #666;
    }

    .item .desc {
      padding: 0 8px;
      margin: 0;
    }

      .item .desc p {
        margin: 0 0 10px 0;
      }

    .source_cont {
      margin: 0;
      padding: 0;
    }

    .source_link a {
      background: #ffc300;
      font-weight: 400;
      font-size: .75em;
      text-transform: uppercase;
      color: #fff;
      text-shadow: 1px 1px 0 #f4b700;
      
      padding: 3px 8px;
      border-radius: 2px;
      transition: background .3s ease-in-out;
    }
      .source_link a:hover {
        background: #FF7200;
        text-shadow: none;
        transition: background .3s ease-in-out;
      }

    .source {
      display: none;
      max-height: 600px;
      overflow-y: scroll;
      margin-bottom: 15px;
    }

      .source .codehilite {
        margin: 0;
      }

  .desc h1, .desc h2, .desc h3 {
    font-size: 100% !important;
  }
  .clear {
    clear: both;
  }

  @media all and (max-width: 950px) {
    #sidebar {
      width: 35%;
    }
    #content {
      width: 65%;
    }
  }
  @media all and (max-width: 650px) {
    #top {
      display: none;
    }
    #sidebar {
      float: none;
      width: auto;
    }
    #content {
      float: none;
      width: auto;
      padding: 30px;
    }

    #index ul {
      padding: 0;
      margin-bottom: 15px;
    }
    #index ul li {
      display: inline-block;
      margin-right: 30px;
    }
    #footer {
      text-align: left;
    }
    #footer p {
      display: block;
      margin: inherit;
    }
  }

  /*****************************/

  </style>

  <style type="text/css">
  .codehilite .hll { background-color: #ffffcc }
.codehilite  { background: #f8f8f8; }
.codehilite .c { color: #408080; font-style: italic } /* Comment */
.codehilite .err { border: 1px solid #FF0000 } /* Error */
.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
.codehilite .o { color: #666666 } /* Operator */
.codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
.codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gr { color: #FF0000 } /* Generic.Error */
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.codehilite .gi { color: #00A000 } /* Generic.Inserted */
.codehilite .go { color: #888888 } /* Generic.Output */
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.codehilite .gt { color: #0044DD } /* Generic.Traceback */
.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.codehilite .kt { color: #B00040 } /* Keyword.Type */
.codehilite .m { color: #666666 } /* Literal.Number */
.codehilite .s { color: #BA2121 } /* Literal.String */
.codehilite .na { color: #7D9029 } /* Name.Attribute */
.codehilite .nb { color: #008000 } /* Name.Builtin */
.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.codehilite .no { color: #880000 } /* Name.Constant */
.codehilite .nd { color: #AA22FF } /* Name.Decorator */
.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.codehilite .nf { color: #0000FF } /* Name.Function */
.codehilite .nl { color: #A0A000 } /* Name.Label */
.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
.codehilite .nv { color: #19177C } /* Name.Variable */
.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
.codehilite .mb { color: #666666 } /* Literal.Number.Bin */
.codehilite .mf { color: #666666 } /* Literal.Number.Float */
.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.codehilite .sx { color: #008000 } /* Literal.String.Other */
.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #0000FF } /* Name.Function.Magic */
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
  </style>

  <style type="text/css">
  
/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}

  </style>

  <script type="text/javascript">
  function toggle(id, $link) {
    $node = document.getElementById(id);
    if (!$node)
    return;
    if (!$node.style.display || $node.style.display == 'none') {
    $node.style.display = 'block';
    $link.innerHTML = 'Hide source &nequiv;';
    } else {
    $node.style.display = 'none';
    $link.innerHTML = 'Show source &equiv;';
    }
  }
  </script>
</head>
<body>
<a href="#" id="top">Top</a>

<div id="container">
    
  
  <div id="sidebar">
    <h1>Index</h1>
    <ul id="index">


    <li class="set"><h3><a href="#header-classes">Classes</a></h3>
      <ul>
        <li class="mono">
        <span class="class_name"><a href="#nexuscli.test.nexuscli_test.TestCli">TestCli</a></span>
        
          
  <ul>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.__init__">__init__</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.addCleanup">addCleanup</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.addTypeEqualityFunc">addTypeEqualityFunc</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertAlmostEqual">assertAlmostEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertAlmostEquals">assertAlmostEquals</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertCountEqual">assertCountEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertDictContainsSubset">assertDictContainsSubset</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertDictEqual">assertDictEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertEqual">assertEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertEquals">assertEquals</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertFalse">assertFalse</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertGreater">assertGreater</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertGreaterEqual">assertGreaterEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertIn">assertIn</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertIs">assertIs</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertIsInstance">assertIsInstance</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertIsNone">assertIsNone</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertIsNot">assertIsNot</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertIsNotNone">assertIsNotNone</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertLess">assertLess</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertLessEqual">assertLessEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertListEqual">assertListEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertLogs">assertLogs</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertMultiLineEqual">assertMultiLineEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEqual">assertNotAlmostEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEquals">assertNotAlmostEquals</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotEqual">assertNotEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotEquals">assertNotEquals</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotIn">assertNotIn</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotIsInstance">assertNotIsInstance</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotRegex">assertNotRegex</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertNotRegexpMatches">assertNotRegexpMatches</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertRaises">assertRaises</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertRaisesRegex">assertRaisesRegex</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertRaisesRegexp">assertRaisesRegexp</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertRegex">assertRegex</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertRegexpMatches">assertRegexpMatches</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertSequenceEqual">assertSequenceEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertSetEqual">assertSetEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertTrue">assertTrue</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertTupleEqual">assertTupleEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertWarns">assertWarns</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assertWarnsRegex">assertWarnsRegex</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.assert_">assert_</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.countTestCases">countTestCases</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.debug">debug</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.defaultTestResult">defaultTestResult</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.doCleanups">doCleanups</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.fail">fail</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failIf">failIf</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failIfAlmostEqual">failIfAlmostEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failIfEqual">failIfEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failUnless">failUnless</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failUnlessAlmostEqual">failUnlessAlmostEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failUnlessEqual">failUnlessEqual</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.failUnlessRaises">failUnlessRaises</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.id">id</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.run">run</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.setUp">setUp</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.shortDescription">shortDescription</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.skipTest">skipTest</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.subTest">subTest</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.tearDown">tearDown</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.test_daily_difference_average">test_daily_difference_average</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_bounding_box">test_data_in_bounds_with_bounding_box</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_metadata_filter">test_data_in_bounds_with_metadata_filter</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.test_list">test_list</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.test_time_series">test_time_series</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.setUpClass">setUpClass</a></li>
    <li class="mono"><a href="#nexuscli.test.nexuscli_test.TestCli.tearDownClass">tearDownClass</a></li>
  </ul>

        </li>
      </ul>
    </li>

    </ul>
  </div>

    <article id="content">
      
  

  


  <header id="section-intro">
  <h1 class="title"><span class="name">nexuscli.test.nexuscli_test</span> module</h1>
  
  
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test" class="source">
    <div class="codehilite"><pre><span></span><span class="c1"># Licensed to the Apache Software Foundation (ASF) under one or more</span>
<span class="c1"># contributor license agreements.  See the NOTICE file distributed with</span>
<span class="c1"># this work for additional information regarding copyright ownership.</span>
<span class="c1"># The ASF licenses this file to You under the Apache License, Version 2.0</span>
<span class="c1"># (the &quot;License&quot;); you may not use this file except in compliance with</span>
<span class="c1"># the License.  You may obtain a copy of the License at</span>
<span class="c1">#</span>
<span class="c1">#   http://www.apache.org/licenses/LICENSE-2.0</span>
<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing, software</span>
<span class="c1"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span>
<span class="c1"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<span class="c1"># See the License for the specific language governing permissions and</span>
<span class="c1"># limitations under the License.</span>

<span class="kn">import</span> <span class="nn">unittest</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>

<span class="kn">from</span> <span class="nn">shapely.geometry</span> <span class="kn">import</span> <span class="n">box</span>

<span class="kn">import</span> <span class="nn">nexuscli</span>


<span class="k">class</span> <span class="nc">TestCli</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>

    <span class="k">def</span> <span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
        <span class="n">nexuscli</span><span class="o">.</span><span class="n">set_target</span><span class="p">(</span><span class="s2">&quot;http://localhost:8083&quot;</span><span class="p">,</span> <span class="n">use_session</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">test_time_series</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">ts</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">time_series</span><span class="p">((</span><span class="s2">&quot;AVHRR_OI_L4_GHRSST_NCEI&quot;</span><span class="p">,</span> <span class="s2">&quot;MEASURES_SLA_JPL_1603&quot;</span><span class="p">),</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">120</span><span class="p">,</span> <span class="mi">60</span><span class="p">),</span>
                                  <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</span><span class="p">))</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">ts</span><span class="p">))</span>

    <span class="k">def</span> <span class="nf">test_list</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">ds_list</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">dataset_list</span><span class="p">()</span>

        <span class="k">print</span><span class="p">(</span><span class="n">ds_list</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">assertTrue</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">ds_list</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">test_daily_difference_average</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">ts</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">daily_difference_average</span><span class="p">(</span><span class="s2">&quot;AVHRR_OI_L4_GHRSST_NCEI&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">120</span><span class="p">,</span> <span class="mi">60</span><span class="p">),</span>
                                               <span class="n">datetime</span><span class="p">(</span><span class="mi">2013</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2014</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</span><span class="p">))</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">ts</span><span class="p">))</span>

    <span class="k">def</span> <span class="nf">test_data_in_bounds_with_metadata_filter</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">subset</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">subset</span><span class="p">(</span><span class="s2">&quot;MUR-JPL-L4-GLOB-v4.1&quot;</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span>
                                 <span class="bp">None</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;id:60758e00-5721-3a6e-bf57-78448bb0aeeb&quot;</span><span class="p">])</span>
        <span class="k">print</span><span class="p">(</span><span class="n">subset</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">test_data_in_bounds_with_bounding_box</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">subset</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">subset</span><span class="p">(</span><span class="s2">&quot;MUR-JPL-L4-GLOB-v4.1&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">149</span><span class="p">,</span> <span class="mi">46</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span>
                                 <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
        <span class="k">print</span><span class="p">(</span><span class="n">subset</span><span class="p">)</span>
</pre></div>

  </div>

  </header>

  <section id="section-items">


    <h2 class="section-title" id="header-classes">Classes</h2>
      
      <div class="item">
      <p id="nexuscli.test.nexuscli_test.TestCli" class="name">class <span class="ident">TestCli</span></p>
      
  
    <div class="desc"><p>A class whose instances are single test cases.</p>
<p>By default, the test code itself should be placed in a method named
'runTest'.</p>
<p>If the fixture may be used for many test cases, create as
many test methods as are needed. When instantiating such a TestCase
subclass, specify in the constructor arguments the name of the test method
that the instance is to execute.</p>
<p>Test authors should subclass TestCase for their own tests. Construction
and deconstruction of the test's environment ('fixture') can be
implemented by overriding the 'setUp' and 'tearDown' methods respectively.</p>
<p>If it is necessary to override the <strong>init</strong> method, the base class
<strong>init</strong> method must always be called. It is important that subclasses
should not change the signature of their <strong>init</strong> method, since instances
of the classes are instantiated automatically by parts of the framework
in order to be run.</p>
<p>When subclassing TestCase, you can set these attributes:
<em> failureException: determines which exception will be raised when
    the instance's assertion methods fail; test methods raising this
    exception will be deemed to have 'failed' rather than 'errored'.
</em> longMessage: determines whether long messages (including repr of
    objects used in assert methods) will be printed on failure in <em>addition</em>
    to any explicit message passed.
* maxDiff: sets the maximum length of a diff in failure messages
    by assert methods using difflib. It is looked up as an instance
    attribute so can be configured by individual tests if required.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli" class="source">
    <div class="codehilite"><pre><span></span><span class="k">class</span> <span class="nc">TestCli</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>

    <span class="k">def</span> <span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
        <span class="n">nexuscli</span><span class="o">.</span><span class="n">set_target</span><span class="p">(</span><span class="s2">&quot;http://localhost:8083&quot;</span><span class="p">,</span> <span class="n">use_session</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">test_time_series</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">ts</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">time_series</span><span class="p">((</span><span class="s2">&quot;AVHRR_OI_L4_GHRSST_NCEI&quot;</span><span class="p">,</span> <span class="s2">&quot;MEASURES_SLA_JPL_1603&quot;</span><span class="p">),</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">120</span><span class="p">,</span> <span class="mi">60</span><span class="p">),</span>
                                  <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</span><span class="p">))</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">ts</span><span class="p">))</span>

    <span class="k">def</span> <span class="nf">test_list</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">ds_list</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">dataset_list</span><span class="p">()</span>

        <span class="k">print</span><span class="p">(</span><span class="n">ds_list</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">assertTrue</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">ds_list</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">test_daily_difference_average</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">ts</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">daily_difference_average</span><span class="p">(</span><span class="s2">&quot;AVHRR_OI_L4_GHRSST_NCEI&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">120</span><span class="p">,</span> <span class="mi">60</span><span class="p">),</span>
                                               <span class="n">datetime</span><span class="p">(</span><span class="mi">2013</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2014</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</span><span class="p">))</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">ts</span><span class="p">))</span>

    <span class="k">def</span> <span class="nf">test_data_in_bounds_with_metadata_filter</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">subset</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">subset</span><span class="p">(</span><span class="s2">&quot;MUR-JPL-L4-GLOB-v4.1&quot;</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span>
                                 <span class="bp">None</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;id:60758e00-5721-3a6e-bf57-78448bb0aeeb&quot;</span><span class="p">])</span>
        <span class="k">print</span><span class="p">(</span><span class="n">subset</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">test_data_in_bounds_with_bounding_box</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="n">subset</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">subset</span><span class="p">(</span><span class="s2">&quot;MUR-JPL-L4-GLOB-v4.1&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">149</span><span class="p">,</span> <span class="mi">46</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span>
                                 <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
        <span class="k">print</span><span class="p">(</span><span class="n">subset</span><span class="p">)</span>
</pre></div>

  </div>
</div>


      <div class="class">
          <h3>Ancestors (in MRO)</h3>
          <ul class="class_list">
          <li><a href="#nexuscli.test.nexuscli_test.TestCli">TestCli</a></li>
          <li>unittest.case.TestCase</li>
          <li>builtins.object</li>
          </ul>
          <h3>Class variables</h3>
            <div class="item">
            <p id="nexuscli.test.nexuscli_test.TestCli.failureException" class="name">var <span class="ident">failureException</span></p>
            

            
  
  <div class="source_cont">
</div>

            </div>
            <div class="item">
            <p id="nexuscli.test.nexuscli_test.TestCli.longMessage" class="name">var <span class="ident">longMessage</span></p>
            

            
  
  <div class="source_cont">
</div>

            </div>
            <div class="item">
            <p id="nexuscli.test.nexuscli_test.TestCli.maxDiff" class="name">var <span class="ident">maxDiff</span></p>
            

            
  
  <div class="source_cont">
</div>

            </div>
          <h3>Static methods</h3>
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.__init__">
    <p>def <span class="ident">__init__</span>(</p><p>self, methodName=&#39;runTest&#39;)</p>
    </div>
    

    
  
    <div class="desc"><p>Create an instance of the class that will use the named test
method when executed. Raises a ValueError if the instance does
not have a method with the specified name.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.__init__', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.__init__" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">methodName</span><span class="o">=</span><span class="s1">&#39;runTest&#39;</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Create an instance of the class that will use the named test</span>
<span class="sd">       method when executed. Raises a ValueError if the instance does</span>
<span class="sd">       not have a method with the specified name.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodName</span> <span class="o">=</span> <span class="n">methodName</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodDoc</span> <span class="o">=</span> <span class="s1">&#39;No test&#39;</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">testMethod</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">methodName</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">methodName</span> <span class="o">!=</span> <span class="s1">&#39;runTest&#39;</span><span class="p">:</span>
            <span class="c1"># we allow instantiation with no explicit method name</span>
            <span class="c1"># but not an *incorrect* or missing method name</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;no such test method in </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span>
                  <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">,</span> <span class="n">methodName</span><span class="p">))</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodDoc</span> <span class="o">=</span> <span class="n">testMethod</span><span class="o">.</span><span class="vm">__doc__</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_cleanups</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_subtest</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="c1"># Map types to custom assertEqual functions that will compare</span>
    <span class="c1"># instances of said type in more detail to generate a more useful</span>
    <span class="c1"># error message.</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_type_equality_funcs</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">addTypeEqualityFunc</span><span class="p">(</span><span class="nb">dict</span><span class="p">,</span> <span class="s1">&#39;assertDictEqual&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">addTypeEqualityFunc</span><span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="s1">&#39;assertListEqual&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">addTypeEqualityFunc</span><span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="s1">&#39;assertTupleEqual&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">addTypeEqualityFunc</span><span class="p">(</span><span class="nb">set</span><span class="p">,</span> <span class="s1">&#39;assertSetEqual&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">addTypeEqualityFunc</span><span class="p">(</span><span class="nb">frozenset</span><span class="p">,</span> <span class="s1">&#39;assertSetEqual&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">addTypeEqualityFunc</span><span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="s1">&#39;assertMultiLineEqual&#39;</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.addCleanup">
    <p>def <span class="ident">addCleanup</span>(</p><p>self, function, *args, **kwargs)</p>
    </div>
    

    
  
    <div class="desc"><p>Add a function, with arguments, to be called when the test is
completed. Functions added are called on a LIFO basis and are
called after tearDown on test failure or success.</p>
<p>Cleanup items are called even if setUp fails (unlike tearDown).</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.addCleanup', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.addCleanup" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">addCleanup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">function</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Add a function, with arguments, to be called when the test is</span>
<span class="sd">    completed. Functions added are called on a LIFO basis and are</span>
<span class="sd">    called after tearDown on test failure or success.</span>
<span class="sd">    Cleanup items are called even if setUp fails (unlike tearDown).&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_cleanups</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">function</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.addTypeEqualityFunc">
    <p>def <span class="ident">addTypeEqualityFunc</span>(</p><p>self, typeobj, function)</p>
    </div>
    

    
  
    <div class="desc"><p>Add a type specific assertEqual style function to compare a type.</p>
<p>This method is for use by TestCase subclasses that need to register
their own type equality functions to provide nicer error messages.</p>
<p>Args:
    typeobj: The data type to call this function on when both values
            are of the same type in assertEqual().
    function: The callable taking two arguments and an optional
            msg= argument that raises self.failureException with a
            useful error message when the two arguments are not equal.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.addTypeEqualityFunc', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.addTypeEqualityFunc" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">addTypeEqualityFunc</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">typeobj</span><span class="p">,</span> <span class="n">function</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Add a type specific assertEqual style function to compare a type.</span>
<span class="sd">    This method is for use by TestCase subclasses that need to register</span>
<span class="sd">    their own type equality functions to provide nicer error messages.</span>
<span class="sd">    Args:</span>
<span class="sd">        typeobj: The data type to call this function on when both values</span>
<span class="sd">                are of the same type in assertEqual().</span>
<span class="sd">        function: The callable taking two arguments and an optional</span>
<span class="sd">                msg= argument that raises self.failureException with a</span>
<span class="sd">                useful error message when the two arguments are not equal.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_type_equality_funcs</span><span class="p">[</span><span class="n">typeobj</span><span class="p">]</span> <span class="o">=</span> <span class="n">function</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertAlmostEqual">
    <p>def <span class="ident">assertAlmostEqual</span>(</p><p>self, first, second, places=None, msg=None, delta=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
difference between the two objects is more than the given
delta.</p>
<p>Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most significant digit).</p>
<p>If the two objects compare equal then they will automatically
compare almost equal.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertAlmostEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertAlmostEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertAlmostEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">places</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                      <span class="n">delta</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail if the two objects are unequal as determined by their</span>
<span class="sd">       difference rounded to the given number of decimal places</span>
<span class="sd">       (default 7) and comparing to zero, or by comparing that the</span>
<span class="sd">       difference between the two objects is more than the given</span>
<span class="sd">       delta.</span>
<span class="sd">       Note that decimal places (from zero) are usually not the same</span>
<span class="sd">       as significant digits (measured from the most significant digit).</span>
<span class="sd">       If the two objects compare equal then they will automatically</span>
<span class="sd">       compare almost equal.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">first</span> <span class="o">==</span> <span class="n">second</span><span class="p">:</span>
        <span class="c1"># shortcut</span>
        <span class="k">return</span>
    <span class="k">if</span> <span class="n">delta</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">places</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
        <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;specify delta or places not both&quot;</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">delta</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
        <span class="k">if</span> <span class="nb">abs</span><span class="p">(</span><span class="n">first</span> <span class="o">-</span> <span class="n">second</span><span class="p">)</span> <span class="o">&lt;=</span> <span class="n">delta</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> != </span><span class="si">%s</span><span class="s1"> within </span><span class="si">%s</span><span class="s1"> delta&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">first</span><span class="p">),</span>
                                                    <span class="n">safe_repr</span><span class="p">(</span><span class="n">second</span><span class="p">),</span>
                                                    <span class="n">safe_repr</span><span class="p">(</span><span class="n">delta</span><span class="p">))</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">places</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
            <span class="n">places</span> <span class="o">=</span> <span class="mi">7</span>
        <span class="k">if</span> <span class="nb">round</span><span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">second</span><span class="o">-</span><span class="n">first</span><span class="p">),</span> <span class="n">places</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> != </span><span class="si">%s</span><span class="s1"> within </span><span class="si">%r</span><span class="s1"> places&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">first</span><span class="p">),</span>
                                                      <span class="n">safe_repr</span><span class="p">(</span><span class="n">second</span><span class="p">),</span>
                                                      <span class="n">places</span><span class="p">)</span>
    <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">)</span>
    <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertAlmostEquals">
    <p>def <span class="ident">assertAlmostEquals</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertAlmostEquals', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertAlmostEquals" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertCountEqual">
    <p>def <span class="ident">assertCountEqual</span>(</p><p>self, first, second, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>An unordered sequence comparison asserting that the same elements,
regardless of order.  If the same element occurs more than once,
it verifies that the elements occur the same number of times.</p>
<div class="codehilite"><pre><span></span>self.assertEqual(Counter(list(first)),
                 Counter(list(second)))
</pre></div>


<p>Example:
    - [0, 1, 1] and [1, 0, 1] compare equal.
    - [0, 0, 1] and [0, 1] compare unequal.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertCountEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertCountEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertCountEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;An unordered sequence comparison asserting that the same elements,</span>
<span class="sd">    regardless of order.  If the same element occurs more than once,</span>
<span class="sd">    it verifies that the elements occur the same number of times.</span>
<span class="sd">        self.assertEqual(Counter(list(first)),</span>
<span class="sd">                         Counter(list(second)))</span>
<span class="sd">     Example:</span>
<span class="sd">        - [0, 1, 1] and [1, 0, 1] compare equal.</span>
<span class="sd">        - [0, 0, 1] and [0, 1] compare unequal.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">first_seq</span><span class="p">,</span> <span class="n">second_seq</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">first</span><span class="p">),</span> <span class="nb">list</span><span class="p">(</span><span class="n">second</span><span class="p">)</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">first</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">Counter</span><span class="p">(</span><span class="n">first_seq</span><span class="p">)</span>
        <span class="n">second</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">Counter</span><span class="p">(</span><span class="n">second_seq</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">TypeError</span><span class="p">:</span>
        <span class="c1"># Handle case with unhashable elements</span>
        <span class="n">differences</span> <span class="o">=</span> <span class="n">_count_diff_all_purpose</span><span class="p">(</span><span class="n">first_seq</span><span class="p">,</span> <span class="n">second_seq</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">first</span> <span class="o">==</span> <span class="n">second</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="n">differences</span> <span class="o">=</span> <span class="n">_count_diff_hashable</span><span class="p">(</span><span class="n">first_seq</span><span class="p">,</span> <span class="n">second_seq</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">differences</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;Element counts were not equal:</span><span class="se">\n</span><span class="s1">&#39;</span>
        <span class="n">lines</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;First has </span><span class="si">%d</span><span class="s1">, Second has </span><span class="si">%d</span><span class="s1">:  </span><span class="si">%r</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">diff</span> <span class="k">for</span> <span class="n">diff</span> <span class="ow">in</span> <span class="n">differences</span><span class="p">]</span>
        <span class="n">diffMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">lines</span><span class="p">)</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_truncateMessage</span><span class="p">(</span><span class="n">standardMsg</span><span class="p">,</span> <span class="n">diffMsg</span><span class="p">)</span>
        <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertDictContainsSubset">
    <p>def <span class="ident">assertDictContainsSubset</span>(</p><p>self, subset, dictionary, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Checks whether dictionary is a superset of subset.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertDictContainsSubset', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertDictContainsSubset" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertDictContainsSubset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">subset</span><span class="p">,</span> <span class="n">dictionary</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Checks whether dictionary is a superset of subset.&quot;&quot;&quot;</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="s1">&#39;assertDictContainsSubset is deprecated&#39;</span><span class="p">,</span>
                  <span class="ne">DeprecationWarning</span><span class="p">)</span>
    <span class="n">missing</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="n">mismatched</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">subset</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
        <span class="k">if</span> <span class="n">key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">dictionary</span><span class="p">:</span>
            <span class="n">missing</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
        <span class="k">elif</span> <span class="n">value</span> <span class="o">!=</span> <span class="n">dictionary</span><span class="p">[</span><span class="n">key</span><span class="p">]:</span>
            <span class="n">mismatched</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%s</span><span class="s1">, expected: </span><span class="si">%s</span><span class="s1">, actual: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span>
                              <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">key</span><span class="p">),</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">value</span><span class="p">),</span>
                               <span class="n">safe_repr</span><span class="p">(</span><span class="n">dictionary</span><span class="p">[</span><span class="n">key</span><span class="p">])))</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">missing</span> <span class="ow">or</span> <span class="n">mismatched</span><span class="p">):</span>
        <span class="k">return</span>
    <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
    <span class="k">if</span> <span class="n">missing</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;Missing: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="s1">&#39;,&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">m</span><span class="p">)</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span>
                                                <span class="n">missing</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">mismatched</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">standardMsg</span><span class="p">:</span>
            <span class="n">standardMsg</span> <span class="o">+=</span> <span class="s1">&#39;; &#39;</span>
        <span class="n">standardMsg</span> <span class="o">+=</span> <span class="s1">&#39;Mismatched values: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="s1">&#39;,&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">mismatched</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertDictEqual">
    <p>def <span class="ident">assertDictEqual</span>(</p><p>self, d1, d2, msg=None)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertDictEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertDictEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertDictEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">d1</span><span class="p">,</span> <span class="n">d2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertIsInstance</span><span class="p">(</span><span class="n">d1</span><span class="p">,</span> <span class="nb">dict</span><span class="p">,</span> <span class="s1">&#39;First argument is not a dictionary&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertIsInstance</span><span class="p">(</span><span class="n">d2</span><span class="p">,</span> <span class="nb">dict</span><span class="p">,</span> <span class="s1">&#39;Second argument is not a dictionary&#39;</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">d1</span> <span class="o">!=</span> <span class="n">d2</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> != </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">_common_shorten_repr</span><span class="p">(</span><span class="n">d1</span><span class="p">,</span> <span class="n">d2</span><span class="p">)</span>
        <span class="n">diff</span> <span class="o">=</span> <span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">difflib</span><span class="o">.</span><span class="n">ndiff</span><span class="p">(</span>
                       <span class="n">pprint</span><span class="o">.</span><span class="n">pformat</span><span class="p">(</span><span class="n">d1</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">(),</span>
                       <span class="n">pprint</span><span class="o">.</span><span class="n">pformat</span><span class="p">(</span><span class="n">d2</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">())))</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_truncateMessage</span><span class="p">(</span><span class="n">standardMsg</span><span class="p">,</span> <span class="n">diff</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertEqual">
    <p>def <span class="ident">assertEqual</span>(</p><p>self, first, second, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail if the two objects are unequal as determined by the '=='
operator.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail if the two objects are unequal as determined by the &#39;==&#39;</span>
<span class="sd">       operator.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">assertion_func</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_getAssertEqualityFunc</span><span class="p">(</span><span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">)</span>
    <span class="n">assertion_func</span><span class="p">(</span><span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertEquals">
    <p>def <span class="ident">assertEquals</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertEquals', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertEquals" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertFalse">
    <p>def <span class="ident">assertFalse</span>(</p><p>self, expr, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Check that the expression is false.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertFalse', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertFalse" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertFalse</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expr</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Check that the expression is false.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">expr</span><span class="p">:</span>
        <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> is not false&quot;</span> <span class="o">%</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">expr</span><span class="p">))</span>
        <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertGreater">
    <p>def <span class="ident">assertGreater</span>(</p><p>self, a, b, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a &gt; b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertGreater', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertGreater" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertGreater</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a &gt; b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">a</span> <span class="o">&gt;</span> <span class="n">b</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> not greater than </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">a</span><span class="p">),</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">b</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertGreaterEqual">
    <p>def <span class="ident">assertGreaterEqual</span>(</p><p>self, a, b, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a &gt;= b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertGreaterEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertGreaterEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertGreaterEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a &gt;= b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">a</span> <span class="o">&gt;=</span> <span class="n">b</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> not greater than or equal to </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">a</span><span class="p">),</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">b</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertIn">
    <p>def <span class="ident">assertIn</span>(</p><p>self, member, container, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a in b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertIn', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertIn" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertIn</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">member</span><span class="p">,</span> <span class="n">container</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a in b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">member</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">container</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> not found in </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">member</span><span class="p">),</span>
                                              <span class="n">safe_repr</span><span class="p">(</span><span class="n">container</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertIs">
    <p>def <span class="ident">assertIs</span>(</p><p>self, expr1, expr2, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a is b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertIs', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertIs" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertIs</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expr1</span><span class="p">,</span> <span class="n">expr2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a is b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">expr1</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">expr2</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> is not </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">expr1</span><span class="p">),</span>
                                         <span class="n">safe_repr</span><span class="p">(</span><span class="n">expr2</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertIsInstance">
    <p>def <span class="ident">assertIsInstance</span>(</p><p>self, obj, cls, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertIsInstance', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertIsInstance" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertIsInstance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Same as self.assertTrue(isinstance(obj, cls)), with a nicer</span>
<span class="sd">    default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="bp">cls</span><span class="p">):</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> is not an instance of </span><span class="si">%r</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">obj</span><span class="p">),</span> <span class="bp">cls</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertIsNone">
    <p>def <span class="ident">assertIsNone</span>(</p><p>self, obj, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Same as self.assertTrue(obj is None), with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertIsNone', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertIsNone" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertIsNone</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Same as self.assertTrue(obj is None), with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">obj</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> is not None&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">obj</span><span class="p">),)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertIsNot">
    <p>def <span class="ident">assertIsNot</span>(</p><p>self, expr1, expr2, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertIsNot', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertIsNot" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertIsNot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expr1</span><span class="p">,</span> <span class="n">expr2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a is not b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">expr1</span> <span class="ow">is</span> <span class="n">expr2</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;unexpectedly identical: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">expr1</span><span class="p">),)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertIsNotNone">
    <p>def <span class="ident">assertIsNotNone</span>(</p><p>self, obj, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Included for symmetry with assertIsNone.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertIsNotNone', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertIsNotNone" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertIsNotNone</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Included for symmetry with assertIsNone.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">obj</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;unexpectedly None&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertLess">
    <p>def <span class="ident">assertLess</span>(</p><p>self, a, b, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a &lt; b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertLess', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertLess" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertLess</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a &lt; b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">a</span> <span class="o">&lt;</span> <span class="n">b</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> not less than </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">a</span><span class="p">),</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">b</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertLessEqual">
    <p>def <span class="ident">assertLessEqual</span>(</p><p>self, a, b, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a &lt;= b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertLessEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertLessEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertLessEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a &lt;= b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">a</span> <span class="o">&lt;=</span> <span class="n">b</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> not less than or equal to </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">a</span><span class="p">),</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">b</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertListEqual">
    <p>def <span class="ident">assertListEqual</span>(</p><p>self, list1, list2, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>A list-specific equality assertion.</p>
<p>Args:
    list1: The first list to compare.
    list2: The second list to compare.
    msg: Optional message to use on failure instead of a list of
            differences.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertListEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertListEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertListEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">list1</span><span class="p">,</span> <span class="n">list2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;A list-specific equality assertion.</span>
<span class="sd">    Args:</span>
<span class="sd">        list1: The first list to compare.</span>
<span class="sd">        list2: The second list to compare.</span>
<span class="sd">        msg: Optional message to use on failure instead of a list of</span>
<span class="sd">                differences.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertSequenceEqual</span><span class="p">(</span><span class="n">list1</span><span class="p">,</span> <span class="n">list2</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">seq_type</span><span class="o">=</span><span class="nb">list</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertLogs">
    <p>def <span class="ident">assertLogs</span>(</p><p>self, logger=None, level=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail unless a log message of level <em>level</em> or higher is emitted
on <em>logger_name</em> or its children.  If omitted, <em>level</em> defaults to
INFO and <em>logger</em> defaults to the root logger.</p>
<p>This method must be used as a context manager, and will yield
a recording object with two attributes: <code>output</code> and <code>records</code>.
At the end of the context manager, the <code>output</code> attribute will
be a list of the matching formatted log messages and the
<code>records</code> attribute will be a list of the corresponding LogRecord
objects.</p>
<p>Example::</p>
<div class="codehilite"><pre><span></span>with self.assertLogs(&#39;foo&#39;, level=&#39;INFO&#39;) as cm:
    logging.getLogger(&#39;foo&#39;).info(&#39;first message&#39;)
    logging.getLogger(&#39;foo.bar&#39;).error(&#39;second message&#39;)
self.assertEqual(cm.output, [&#39;INFO:foo:first message&#39;,
                             &#39;ERROR:foo.bar:second message&#39;])
</pre></div></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertLogs', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertLogs" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertLogs</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">logger</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail unless a log message of level *level* or higher is emitted</span>
<span class="sd">    on *logger_name* or its children.  If omitted, *level* defaults to</span>
<span class="sd">    INFO and *logger* defaults to the root logger.</span>
<span class="sd">    This method must be used as a context manager, and will yield</span>
<span class="sd">    a recording object with two attributes: `output` and `records`.</span>
<span class="sd">    At the end of the context manager, the `output` attribute will</span>
<span class="sd">    be a list of the matching formatted log messages and the</span>
<span class="sd">    `records` attribute will be a list of the corresponding LogRecord</span>
<span class="sd">    objects.</span>
<span class="sd">    Example::</span>
<span class="sd">        with self.assertLogs(&#39;foo&#39;, level=&#39;INFO&#39;) as cm:</span>
<span class="sd">            logging.getLogger(&#39;foo&#39;).info(&#39;first message&#39;)</span>
<span class="sd">            logging.getLogger(&#39;foo.bar&#39;).error(&#39;second message&#39;)</span>
<span class="sd">        self.assertEqual(cm.output, [&#39;INFO:foo:first message&#39;,</span>
<span class="sd">                                     &#39;ERROR:foo.bar:second message&#39;])</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">_AssertLogsContext</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">logger</span><span class="p">,</span> <span class="n">level</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertMultiLineEqual">
    <p>def <span class="ident">assertMultiLineEqual</span>(</p><p>self, first, second, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Assert that two multi-line strings are equal.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertMultiLineEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertMultiLineEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertMultiLineEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Assert that two multi-line strings are equal.&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertIsInstance</span><span class="p">(</span><span class="n">first</span><span class="p">,</span> <span class="nb">str</span><span class="p">,</span> <span class="s1">&#39;First argument is not a string&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertIsInstance</span><span class="p">(</span><span class="n">second</span><span class="p">,</span> <span class="nb">str</span><span class="p">,</span> <span class="s1">&#39;Second argument is not a string&#39;</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">first</span> <span class="o">!=</span> <span class="n">second</span><span class="p">:</span>
        <span class="c1"># don&#39;t use difflib if the strings are too long</span>
        <span class="k">if</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">first</span><span class="p">)</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">_diffThreshold</span> <span class="ow">or</span>
            <span class="nb">len</span><span class="p">(</span><span class="n">second</span><span class="p">)</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">_diffThreshold</span><span class="p">):</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_baseAssertEqual</span><span class="p">(</span><span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span>
        <span class="n">firstlines</span> <span class="o">=</span> <span class="n">first</span><span class="o">.</span><span class="n">splitlines</span><span class="p">(</span><span class="n">keepends</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
        <span class="n">secondlines</span> <span class="o">=</span> <span class="n">second</span><span class="o">.</span><span class="n">splitlines</span><span class="p">(</span><span class="n">keepends</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">firstlines</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">and</span> <span class="n">first</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\r\n</span><span class="s1">&#39;</span><span class="p">)</span> <span class="o">==</span> <span class="n">first</span><span class="p">:</span>
            <span class="n">firstlines</span> <span class="o">=</span> <span class="p">[</span><span class="n">first</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">]</span>
            <span class="n">secondlines</span> <span class="o">=</span> <span class="p">[</span><span class="n">second</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">]</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> != </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">_common_shorten_repr</span><span class="p">(</span><span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">)</span>
        <span class="n">diff</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">+</span> <span class="s1">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">difflib</span><span class="o">.</span><span class="n">ndiff</span><span class="p">(</span><span class="n">firstlines</span><span class="p">,</span> <span class="n">secondlines</span><span class="p">))</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_truncateMessage</span><span class="p">(</span><span class="n">standardMsg</span><span class="p">,</span> <span class="n">diff</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEqual">
    <p>def <span class="ident">assertNotAlmostEqual</span>(</p><p>self, first, second, places=None, msg=None, delta=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
difference between the two objects is less than the given delta.</p>
<p>Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most significant digit).</p>
<p>Objects that are equal automatically fail.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertNotAlmostEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">places</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
                         <span class="n">delta</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail if the two objects are equal as determined by their</span>
<span class="sd">       difference rounded to the given number of decimal places</span>
<span class="sd">       (default 7) and comparing to zero, or by comparing that the</span>
<span class="sd">       difference between the two objects is less than the given delta.</span>
<span class="sd">       Note that decimal places (from zero) are usually not the same</span>
<span class="sd">       as significant digits (measured from the most significant digit).</span>
<span class="sd">       Objects that are equal automatically fail.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">delta</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">places</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
        <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;specify delta or places not both&quot;</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">delta</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">first</span> <span class="o">==</span> <span class="n">second</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">abs</span><span class="p">(</span><span class="n">first</span> <span class="o">-</span> <span class="n">second</span><span class="p">)</span> <span class="o">&gt;</span> <span class="n">delta</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> == </span><span class="si">%s</span><span class="s1"> within </span><span class="si">%s</span><span class="s1"> delta&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">first</span><span class="p">),</span>
                                                    <span class="n">safe_repr</span><span class="p">(</span><span class="n">second</span><span class="p">),</span>
                                                    <span class="n">safe_repr</span><span class="p">(</span><span class="n">delta</span><span class="p">))</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">places</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
            <span class="n">places</span> <span class="o">=</span> <span class="mi">7</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">first</span> <span class="o">==</span> <span class="n">second</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">round</span><span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">second</span><span class="o">-</span><span class="n">first</span><span class="p">),</span> <span class="n">places</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> == </span><span class="si">%s</span><span class="s1"> within </span><span class="si">%r</span><span class="s1"> places&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">first</span><span class="p">),</span>
                                                     <span class="n">safe_repr</span><span class="p">(</span><span class="n">second</span><span class="p">),</span>
                                                     <span class="n">places</span><span class="p">)</span>
    <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">)</span>
    <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEquals">
    <p>def <span class="ident">assertNotAlmostEquals</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEquals', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotAlmostEquals" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotEqual">
    <p>def <span class="ident">assertNotEqual</span>(</p><p>self, first, second, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail if the two objects are equal as determined by the '!='
operator.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertNotEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">first</span><span class="p">,</span> <span class="n">second</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail if the two objects are equal as determined by the &#39;!=&#39;</span>
<span class="sd">       operator.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">first</span> <span class="o">!=</span> <span class="n">second</span><span class="p">:</span>
        <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> == </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">first</span><span class="p">),</span>
                                                      <span class="n">safe_repr</span><span class="p">(</span><span class="n">second</span><span class="p">)))</span>
        <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotEquals">
    <p>def <span class="ident">assertNotEquals</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotEquals', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotEquals" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotIn">
    <p>def <span class="ident">assertNotIn</span>(</p><p>self, member, container, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotIn', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotIn" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertNotIn</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">member</span><span class="p">,</span> <span class="n">container</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Just like self.assertTrue(a not in b), but with a nicer default message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">member</span> <span class="ow">in</span> <span class="n">container</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> unexpectedly found in </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">member</span><span class="p">),</span>
                                                    <span class="n">safe_repr</span><span class="p">(</span><span class="n">container</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotIsInstance">
    <p>def <span class="ident">assertNotIsInstance</span>(</p><p>self, obj, cls, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Included for symmetry with assertIsInstance.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotIsInstance', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotIsInstance" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertNotIsInstance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Included for symmetry with assertIsInstance.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="bp">cls</span><span class="p">):</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> is an instance of </span><span class="si">%r</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">safe_repr</span><span class="p">(</span><span class="n">obj</span><span class="p">),</span> <span class="bp">cls</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotRegex">
    <p>def <span class="ident">assertNotRegex</span>(</p><p>self, text, unexpected_regex, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail the test if the text matches the regular expression.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotRegex', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotRegex" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertNotRegex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">,</span> <span class="n">unexpected_regex</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail the test if the text matches the regular expression.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">unexpected_regex</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="nb">bytes</span><span class="p">)):</span>
        <span class="n">unexpected_regex</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">unexpected_regex</span><span class="p">)</span>
    <span class="n">match</span> <span class="o">=</span> <span class="n">unexpected_regex</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">text</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">match</span><span class="p">:</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;Regex matched: </span><span class="si">%r</span><span class="s1"> matches </span><span class="si">%r</span><span class="s1"> in </span><span class="si">%r</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span>
            <span class="n">text</span><span class="p">[</span><span class="n">match</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="p">:</span> <span class="n">match</span><span class="o">.</span><span class="n">end</span><span class="p">()],</span>
            <span class="n">unexpected_regex</span><span class="o">.</span><span class="n">pattern</span><span class="p">,</span>
            <span class="n">text</span><span class="p">)</span>
        <span class="c1"># _formatMessage ensures the longMessage option is respected</span>
        <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">)</span>
        <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertNotRegexpMatches">
    <p>def <span class="ident">assertNotRegexpMatches</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertNotRegexpMatches', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertNotRegexpMatches" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertRaises">
    <p>def <span class="ident">assertRaises</span>(</p><p>self, expected_exception, *args, **kwargs)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail unless an exception of class expected_exception is raised
by the callable when invoked with specified positional and
keyword arguments. If a different type of exception is
raised, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.</p>
<p>If called with the callable and arguments omitted, will return a
context object used like this::</p>
<div class="codehilite"><pre><span></span> with self.assertRaises(SomeException):
     do_something()
</pre></div>


<p>An optional keyword argument 'msg' can be provided when assertRaises
is used as a context object.</p>
<p>The context manager keeps a reference to the exception as
the 'exception' attribute. This allows you to inspect the
exception after the assertion::</p>
<div class="codehilite"><pre><span></span>with self.assertRaises(SomeException) as cm:
    do_something()
the_exception = cm.exception
self.assertEqual(the_exception.error_code, 3)
</pre></div></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertRaises', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertRaises" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertRaises</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expected_exception</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail unless an exception of class expected_exception is raised</span>
<span class="sd">       by the callable when invoked with specified positional and</span>
<span class="sd">       keyword arguments. If a different type of exception is</span>
<span class="sd">       raised, it will not be caught, and the test case will be</span>
<span class="sd">       deemed to have suffered an error, exactly as for an</span>
<span class="sd">       unexpected exception.</span>
<span class="sd">       If called with the callable and arguments omitted, will return a</span>
<span class="sd">       context object used like this::</span>
<span class="sd">            with self.assertRaises(SomeException):</span>
<span class="sd">                do_something()</span>
<span class="sd">       An optional keyword argument &#39;msg&#39; can be provided when assertRaises</span>
<span class="sd">       is used as a context object.</span>
<span class="sd">       The context manager keeps a reference to the exception as</span>
<span class="sd">       the &#39;exception&#39; attribute. This allows you to inspect the</span>
<span class="sd">       exception after the assertion::</span>
<span class="sd">           with self.assertRaises(SomeException) as cm:</span>
<span class="sd">               do_something()</span>
<span class="sd">           the_exception = cm.exception</span>
<span class="sd">           self.assertEqual(the_exception.error_code, 3)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">context</span> <span class="o">=</span> <span class="n">_AssertRaisesContext</span><span class="p">(</span><span class="n">expected_exception</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">context</span><span class="o">.</span><span class="n">handle</span><span class="p">(</span><span class="s1">&#39;assertRaises&#39;</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
    <span class="k">finally</span><span class="p">:</span>
        <span class="c1"># bpo-23890: manually break a reference cycle</span>
        <span class="n">context</span> <span class="o">=</span> <span class="bp">None</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertRaisesRegex">
    <p>def <span class="ident">assertRaisesRegex</span>(</p><p>self, expected_exception, expected_regex, *args, **kwargs)</p>
    </div>
    

    
  
    <div class="desc"><p>Asserts that the message in a raised exception matches a regex.</p>
<p>Args:
    expected_exception: Exception class expected to be raised.
    expected_regex: Regex (re pattern object or string) expected
            to be found in error message.
    args: Function to be called and extra positional args.
    kwargs: Extra kwargs.
    msg: Optional message used in case of failure. Can only be used
            when assertRaisesRegex is used as a context manager.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertRaisesRegex', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertRaisesRegex" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertRaisesRegex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expected_exception</span><span class="p">,</span> <span class="n">expected_regex</span><span class="p">,</span>
                      <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Asserts that the message in a raised exception matches a regex.</span>
<span class="sd">    Args:</span>
<span class="sd">        expected_exception: Exception class expected to be raised.</span>
<span class="sd">        expected_regex: Regex (re pattern object or string) expected</span>
<span class="sd">                to be found in error message.</span>
<span class="sd">        args: Function to be called and extra positional args.</span>
<span class="sd">        kwargs: Extra kwargs.</span>
<span class="sd">        msg: Optional message used in case of failure. Can only be used</span>
<span class="sd">                when assertRaisesRegex is used as a context manager.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">context</span> <span class="o">=</span> <span class="n">_AssertRaisesContext</span><span class="p">(</span><span class="n">expected_exception</span><span class="p">,</span> <span class="bp">self</span><span class="p">,</span> <span class="n">expected_regex</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">context</span><span class="o">.</span><span class="n">handle</span><span class="p">(</span><span class="s1">&#39;assertRaisesRegex&#39;</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertRaisesRegexp">
    <p>def <span class="ident">assertRaisesRegexp</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertRaisesRegexp', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertRaisesRegexp" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertRegex">
    <p>def <span class="ident">assertRegex</span>(</p><p>self, text, expected_regex, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail the test unless the text matches the regular expression.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertRegex', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertRegex" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertRegex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">text</span><span class="p">,</span> <span class="n">expected_regex</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail the test unless the text matches the regular expression.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expected_regex</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="nb">bytes</span><span class="p">)):</span>
        <span class="k">assert</span> <span class="n">expected_regex</span><span class="p">,</span> <span class="s2">&quot;expected_regex must not be empty.&quot;</span>
        <span class="n">expected_regex</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">expected_regex</span><span class="p">)</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">expected_regex</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">text</span><span class="p">):</span>
        <span class="n">standardMsg</span> <span class="o">=</span> <span class="s2">&quot;Regex didn&#39;t match: </span><span class="si">%r</span><span class="s2"> not found in </span><span class="si">%r</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span>
            <span class="n">expected_regex</span><span class="o">.</span><span class="n">pattern</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span>
        <span class="c1"># _formatMessage ensures the longMessage option is respected</span>
        <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">)</span>
        <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertRegexpMatches">
    <p>def <span class="ident">assertRegexpMatches</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertRegexpMatches', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertRegexpMatches" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertSequenceEqual">
    <p>def <span class="ident">assertSequenceEqual</span>(</p><p>self, seq1, seq2, msg=None, seq_type=None)</p>
    </div>
    

    
  
    <div class="desc"><p>An equality assertion for ordered sequences (like lists and tuples).</p>
<p>For the purposes of this function, a valid ordered sequence type is one
which can be indexed, has a length, and has an equality operator.</p>
<p>Args:
    seq1: The first sequence to compare.
    seq2: The second sequence to compare.
    seq_type: The expected datatype of the sequences, or None if no
            datatype should be enforced.
    msg: Optional message to use on failure instead of a list of
            differences.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertSequenceEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertSequenceEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertSequenceEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq1</span><span class="p">,</span> <span class="n">seq2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">seq_type</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;An equality assertion for ordered sequences (like lists and tuples).</span>
<span class="sd">    For the purposes of this function, a valid ordered sequence type is one</span>
<span class="sd">    which can be indexed, has a length, and has an equality operator.</span>
<span class="sd">    Args:</span>
<span class="sd">        seq1: The first sequence to compare.</span>
<span class="sd">        seq2: The second sequence to compare.</span>
<span class="sd">        seq_type: The expected datatype of the sequences, or None if no</span>
<span class="sd">                datatype should be enforced.</span>
<span class="sd">        msg: Optional message to use on failure instead of a list of</span>
<span class="sd">                differences.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">seq_type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
        <span class="n">seq_type_name</span> <span class="o">=</span> <span class="n">seq_type</span><span class="o">.</span><span class="vm">__name__</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">seq1</span><span class="p">,</span> <span class="n">seq_type</span><span class="p">):</span>
            <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="s1">&#39;First sequence is not a </span><span class="si">%s</span><span class="s1">: </span><span class="si">%s</span><span class="s1">&#39;</span>
                                    <span class="o">%</span> <span class="p">(</span><span class="n">seq_type_name</span><span class="p">,</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">seq1</span><span class="p">)))</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">seq2</span><span class="p">,</span> <span class="n">seq_type</span><span class="p">):</span>
            <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="s1">&#39;Second sequence is not a </span><span class="si">%s</span><span class="s1">: </span><span class="si">%s</span><span class="s1">&#39;</span>
                                    <span class="o">%</span> <span class="p">(</span><span class="n">seq_type_name</span><span class="p">,</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">seq2</span><span class="p">)))</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">seq_type_name</span> <span class="o">=</span> <span class="s2">&quot;sequence&quot;</span>
    <span class="n">differing</span> <span class="o">=</span> <span class="bp">None</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">len1</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">seq1</span><span class="p">)</span>
    <span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
        <span class="n">differing</span> <span class="o">=</span> <span class="s1">&#39;First </span><span class="si">%s</span><span class="s1"> has no length.    Non-sequence?&#39;</span> <span class="o">%</span> <span class="p">(</span>
                <span class="n">seq_type_name</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">differing</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="n">len2</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">seq2</span><span class="p">)</span>
        <span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
            <span class="n">differing</span> <span class="o">=</span> <span class="s1">&#39;Second </span><span class="si">%s</span><span class="s1"> has no length.    Non-sequence?&#39;</span> <span class="o">%</span> <span class="p">(</span>
                    <span class="n">seq_type_name</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">differing</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">seq1</span> <span class="o">==</span> <span class="n">seq2</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="n">differing</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1">s differ: </span><span class="si">%s</span><span class="s1"> != </span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span>
                <span class="p">(</span><span class="n">seq_type_name</span><span class="o">.</span><span class="n">capitalize</span><span class="p">(),)</span> <span class="o">+</span>
                <span class="n">_common_shorten_repr</span><span class="p">(</span><span class="n">seq1</span><span class="p">,</span> <span class="n">seq2</span><span class="p">))</span>
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">min</span><span class="p">(</span><span class="n">len1</span><span class="p">,</span> <span class="n">len2</span><span class="p">)):</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">item1</span> <span class="o">=</span> <span class="n">seq1</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
            <span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Unable to index element </span><span class="si">%d</span><span class="s1"> of first </span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span>
                             <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">seq_type_name</span><span class="p">))</span>
                <span class="k">break</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">item2</span> <span class="o">=</span> <span class="n">seq2</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
            <span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Unable to index element </span><span class="si">%d</span><span class="s1"> of second </span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span>
                             <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">seq_type_name</span><span class="p">))</span>
                <span class="k">break</span>
            <span class="k">if</span> <span class="n">item1</span> <span class="o">!=</span> <span class="n">item2</span><span class="p">:</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">First differing element </span><span class="si">%d</span><span class="s1">:</span><span class="se">\n</span><span class="si">%s</span><span class="se">\n</span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span>
                             <span class="p">((</span><span class="n">i</span><span class="p">,)</span> <span class="o">+</span> <span class="n">_common_shorten_repr</span><span class="p">(</span><span class="n">item1</span><span class="p">,</span> <span class="n">item2</span><span class="p">)))</span>
                <span class="k">break</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">if</span> <span class="p">(</span><span class="n">len1</span> <span class="o">==</span> <span class="n">len2</span> <span class="ow">and</span> <span class="n">seq_type</span> <span class="ow">is</span> <span class="bp">None</span> <span class="ow">and</span>
                <span class="nb">type</span><span class="p">(</span><span class="n">seq1</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">type</span><span class="p">(</span><span class="n">seq2</span><span class="p">)):</span>
                <span class="c1"># The sequences are the same, but have differing types.</span>
                <span class="k">return</span>
        <span class="k">if</span> <span class="n">len1</span> <span class="o">&gt;</span> <span class="n">len2</span><span class="p">:</span>
            <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">First </span><span class="si">%s</span><span class="s1"> contains </span><span class="si">%d</span><span class="s1"> additional &#39;</span>
                         <span class="s1">&#39;elements.</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">seq_type_name</span><span class="p">,</span> <span class="n">len1</span> <span class="o">-</span> <span class="n">len2</span><span class="p">))</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;First extra element </span><span class="si">%d</span><span class="s1">:</span><span class="se">\n</span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span>
                              <span class="p">(</span><span class="n">len2</span><span class="p">,</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">seq1</span><span class="p">[</span><span class="n">len2</span><span class="p">])))</span>
            <span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;Unable to index element </span><span class="si">%d</span><span class="s1"> &#39;</span>
                              <span class="s1">&#39;of first </span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">len2</span><span class="p">,</span> <span class="n">seq_type_name</span><span class="p">))</span>
        <span class="k">elif</span> <span class="n">len1</span> <span class="o">&lt;</span> <span class="n">len2</span><span class="p">:</span>
            <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Second </span><span class="si">%s</span><span class="s1"> contains </span><span class="si">%d</span><span class="s1"> additional &#39;</span>
                         <span class="s1">&#39;elements.</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">seq_type_name</span><span class="p">,</span> <span class="n">len2</span> <span class="o">-</span> <span class="n">len1</span><span class="p">))</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;First extra element </span><span class="si">%d</span><span class="s1">:</span><span class="se">\n</span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span>
                              <span class="p">(</span><span class="n">len1</span><span class="p">,</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">seq2</span><span class="p">[</span><span class="n">len1</span><span class="p">])))</span>
            <span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
                <span class="n">differing</span> <span class="o">+=</span> <span class="p">(</span><span class="s1">&#39;Unable to index element </span><span class="si">%d</span><span class="s1"> &#39;</span>
                              <span class="s1">&#39;of second </span><span class="si">%s</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">len1</span><span class="p">,</span> <span class="n">seq_type_name</span><span class="p">))</span>
    <span class="n">standardMsg</span> <span class="o">=</span> <span class="n">differing</span>
    <span class="n">diffMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
        <span class="n">difflib</span><span class="o">.</span><span class="n">ndiff</span><span class="p">(</span><span class="n">pprint</span><span class="o">.</span><span class="n">pformat</span><span class="p">(</span><span class="n">seq1</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">(),</span>
                      <span class="n">pprint</span><span class="o">.</span><span class="n">pformat</span><span class="p">(</span><span class="n">seq2</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()))</span>
    <span class="n">standardMsg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_truncateMessage</span><span class="p">(</span><span class="n">standardMsg</span><span class="p">,</span> <span class="n">diffMsg</span><span class="p">)</span>
    <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertSetEqual">
    <p>def <span class="ident">assertSetEqual</span>(</p><p>self, set1, set2, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>A set-specific equality assertion.</p>
<p>Args:
    set1: The first set to compare.
    set2: The second set to compare.
    msg: Optional message to use on failure instead of a list of
            differences.</p>
<p>assertSetEqual uses ducktyping to support different types of sets, and
is optimized for sets specifically (parameters must support a
difference method).</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertSetEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertSetEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertSetEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">set1</span><span class="p">,</span> <span class="n">set2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;A set-specific equality assertion.</span>
<span class="sd">    Args:</span>
<span class="sd">        set1: The first set to compare.</span>
<span class="sd">        set2: The second set to compare.</span>
<span class="sd">        msg: Optional message to use on failure instead of a list of</span>
<span class="sd">                differences.</span>
<span class="sd">    assertSetEqual uses ducktyping to support different types of sets, and</span>
<span class="sd">    is optimized for sets specifically (parameters must support a</span>
<span class="sd">    difference method).</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">difference1</span> <span class="o">=</span> <span class="n">set1</span><span class="o">.</span><span class="n">difference</span><span class="p">(</span><span class="n">set2</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="s1">&#39;invalid type when attempting set difference: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">e</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">AttributeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="s1">&#39;first argument does not support set difference: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">e</span><span class="p">)</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">difference2</span> <span class="o">=</span> <span class="n">set2</span><span class="o">.</span><span class="n">difference</span><span class="p">(</span><span class="n">set1</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">TypeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="s1">&#39;invalid type when attempting set difference: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">e</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">AttributeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="s1">&#39;second argument does not support set difference: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">e</span><span class="p">)</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">difference1</span> <span class="ow">or</span> <span class="n">difference2</span><span class="p">):</span>
        <span class="k">return</span>
    <span class="n">lines</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">if</span> <span class="n">difference1</span><span class="p">:</span>
        <span class="n">lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;Items in the first set but not the second:&#39;</span><span class="p">)</span>
        <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">difference1</span><span class="p">:</span>
            <span class="n">lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">item</span><span class="p">))</span>
    <span class="k">if</span> <span class="n">difference2</span><span class="p">:</span>
        <span class="n">lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;Items in the second set but not the first:&#39;</span><span class="p">)</span>
        <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">difference2</span><span class="p">:</span>
            <span class="n">lines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">item</span><span class="p">))</span>
    <span class="n">standardMsg</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">lines</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">fail</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">standardMsg</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertTrue">
    <p>def <span class="ident">assertTrue</span>(</p><p>self, expr, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Check that the expression is true.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertTrue', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertTrue" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertTrue</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expr</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Check that the expression is true.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">expr</span><span class="p">:</span>
        <span class="n">msg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_formatMessage</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> is not true&quot;</span> <span class="o">%</span> <span class="n">safe_repr</span><span class="p">(</span><span class="n">expr</span><span class="p">))</span>
        <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertTupleEqual">
    <p>def <span class="ident">assertTupleEqual</span>(</p><p>self, tuple1, tuple2, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>A tuple-specific equality assertion.</p>
<p>Args:
    tuple1: The first tuple to compare.
    tuple2: The second tuple to compare.
    msg: Optional message to use on failure instead of a list of
            differences.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertTupleEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertTupleEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertTupleEqual</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">tuple1</span><span class="p">,</span> <span class="n">tuple2</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;A tuple-specific equality assertion.</span>
<span class="sd">    Args:</span>
<span class="sd">        tuple1: The first tuple to compare.</span>
<span class="sd">        tuple2: The second tuple to compare.</span>
<span class="sd">        msg: Optional message to use on failure instead of a list of</span>
<span class="sd">                differences.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertSequenceEqual</span><span class="p">(</span><span class="n">tuple1</span><span class="p">,</span> <span class="n">tuple2</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">seq_type</span><span class="o">=</span><span class="nb">tuple</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertWarns">
    <p>def <span class="ident">assertWarns</span>(</p><p>self, expected_warning, *args, **kwargs)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail unless a warning of class warnClass is triggered
by the callable when invoked with specified positional and
keyword arguments.  If a different type of warning is
triggered, it will not be handled: depending on the other
warning filtering rules in effect, it might be silenced, printed
out, or raised as an exception.</p>
<p>If called with the callable and arguments omitted, will return a
context object used like this::</p>
<div class="codehilite"><pre><span></span> with self.assertWarns(SomeWarning):
     do_something()
</pre></div>


<p>An optional keyword argument 'msg' can be provided when assertWarns
is used as a context object.</p>
<p>The context manager keeps a reference to the first matching
warning as the 'warning' attribute; similarly, the 'filename'
and 'lineno' attributes give you information about the line
of Python code from which the warning was triggered.
This allows you to inspect the warning after the assertion::</p>
<div class="codehilite"><pre><span></span>with self.assertWarns(SomeWarning) as cm:
    do_something()
the_warning = cm.warning
self.assertEqual(the_warning.some_attribute, 147)
</pre></div></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertWarns', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertWarns" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertWarns</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expected_warning</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail unless a warning of class warnClass is triggered</span>
<span class="sd">       by the callable when invoked with specified positional and</span>
<span class="sd">       keyword arguments.  If a different type of warning is</span>
<span class="sd">       triggered, it will not be handled: depending on the other</span>
<span class="sd">       warning filtering rules in effect, it might be silenced, printed</span>
<span class="sd">       out, or raised as an exception.</span>
<span class="sd">       If called with the callable and arguments omitted, will return a</span>
<span class="sd">       context object used like this::</span>
<span class="sd">            with self.assertWarns(SomeWarning):</span>
<span class="sd">                do_something()</span>
<span class="sd">       An optional keyword argument &#39;msg&#39; can be provided when assertWarns</span>
<span class="sd">       is used as a context object.</span>
<span class="sd">       The context manager keeps a reference to the first matching</span>
<span class="sd">       warning as the &#39;warning&#39; attribute; similarly, the &#39;filename&#39;</span>
<span class="sd">       and &#39;lineno&#39; attributes give you information about the line</span>
<span class="sd">       of Python code from which the warning was triggered.</span>
<span class="sd">       This allows you to inspect the warning after the assertion::</span>
<span class="sd">           with self.assertWarns(SomeWarning) as cm:</span>
<span class="sd">               do_something()</span>
<span class="sd">           the_warning = cm.warning</span>
<span class="sd">           self.assertEqual(the_warning.some_attribute, 147)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">context</span> <span class="o">=</span> <span class="n">_AssertWarnsContext</span><span class="p">(</span><span class="n">expected_warning</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">context</span><span class="o">.</span><span class="n">handle</span><span class="p">(</span><span class="s1">&#39;assertWarns&#39;</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assertWarnsRegex">
    <p>def <span class="ident">assertWarnsRegex</span>(</p><p>self, expected_warning, expected_regex, *args, **kwargs)</p>
    </div>
    

    
  
    <div class="desc"><p>Asserts that the message in a triggered warning matches a regexp.
Basic functioning is similar to assertWarns() with the addition
that only warnings whose messages also match the regular expression
are considered successful matches.</p>
<p>Args:
    expected_warning: Warning class expected to be triggered.
    expected_regex: Regex (re pattern object or string) expected
            to be found in error message.
    args: Function to be called and extra positional args.
    kwargs: Extra kwargs.
    msg: Optional message used in case of failure. Can only be used
            when assertWarnsRegex is used as a context manager.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assertWarnsRegex', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assertWarnsRegex" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">assertWarnsRegex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expected_warning</span><span class="p">,</span> <span class="n">expected_regex</span><span class="p">,</span>
                     <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Asserts that the message in a triggered warning matches a regexp.</span>
<span class="sd">    Basic functioning is similar to assertWarns() with the addition</span>
<span class="sd">    that only warnings whose messages also match the regular expression</span>
<span class="sd">    are considered successful matches.</span>
<span class="sd">    Args:</span>
<span class="sd">        expected_warning: Warning class expected to be triggered.</span>
<span class="sd">        expected_regex: Regex (re pattern object or string) expected</span>
<span class="sd">                to be found in error message.</span>
<span class="sd">        args: Function to be called and extra positional args.</span>
<span class="sd">        kwargs: Extra kwargs.</span>
<span class="sd">        msg: Optional message used in case of failure. Can only be used</span>
<span class="sd">                when assertWarnsRegex is used as a context manager.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">context</span> <span class="o">=</span> <span class="n">_AssertWarnsContext</span><span class="p">(</span><span class="n">expected_warning</span><span class="p">,</span> <span class="bp">self</span><span class="p">,</span> <span class="n">expected_regex</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">context</span><span class="o">.</span><span class="n">handle</span><span class="p">(</span><span class="s1">&#39;assertWarnsRegex&#39;</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.assert_">
    <p>def <span class="ident">assert_</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.assert_', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.assert_" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.countTestCases">
    <p>def <span class="ident">countTestCases</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.countTestCases', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.countTestCases" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">countTestCases</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="k">return</span> <span class="mi">1</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.debug">
    <p>def <span class="ident">debug</span>(</p><p>self)</p>
    </div>
    

    
  
    <div class="desc"><p>Run the test without collecting errors in a TestResult</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.debug', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.debug" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">debug</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Run the test without collecting errors in a TestResult&quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
    <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodName</span><span class="p">)()</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">tearDown</span><span class="p">()</span>
    <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cleanups</span><span class="p">:</span>
        <span class="n">function</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cleanups</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
        <span class="n">function</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.defaultTestResult">
    <p>def <span class="ident">defaultTestResult</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.defaultTestResult', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.defaultTestResult" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">defaultTestResult</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="k">return</span> <span class="n">result</span><span class="o">.</span><span class="n">TestResult</span><span class="p">()</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.doCleanups">
    <p>def <span class="ident">doCleanups</span>(</p><p>self)</p>
    </div>
    

    
  
    <div class="desc"><p>Execute all cleanup functions. Normally called for you after
tearDown.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.doCleanups', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.doCleanups" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">doCleanups</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Execute all cleanup functions. Normally called for you after</span>
<span class="sd">    tearDown.&quot;&quot;&quot;</span>
    <span class="n">outcome</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span> <span class="ow">or</span> <span class="n">_Outcome</span><span class="p">()</span>
    <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cleanups</span><span class="p">:</span>
        <span class="n">function</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_cleanups</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span>
        <span class="k">with</span> <span class="n">outcome</span><span class="o">.</span><span class="n">testPartExecutor</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
            <span class="n">function</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
    <span class="c1"># return this for backwards compatibility</span>
    <span class="c1"># even though we no longer us it internally</span>
    <span class="k">return</span> <span class="n">outcome</span><span class="o">.</span><span class="n">success</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.fail">
    <p>def <span class="ident">fail</span>(</p><p>self, msg=None)</p>
    </div>
    

    
  
    <div class="desc"><p>Fail immediately, with the given message.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.fail', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.fail" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">fail</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fail immediately, with the given message.&quot;&quot;&quot;</span>
    <span class="k">raise</span> <span class="bp">self</span><span class="o">.</span><span class="n">failureException</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failIf">
    <p>def <span class="ident">failIf</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failIf', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failIf" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failIfAlmostEqual">
    <p>def <span class="ident">failIfAlmostEqual</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failIfAlmostEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failIfAlmostEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failIfEqual">
    <p>def <span class="ident">failIfEqual</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failIfEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failIfEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failUnless">
    <p>def <span class="ident">failUnless</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failUnless', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failUnless" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failUnlessAlmostEqual">
    <p>def <span class="ident">failUnlessAlmostEqual</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failUnlessAlmostEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failUnlessAlmostEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failUnlessEqual">
    <p>def <span class="ident">failUnlessEqual</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failUnlessEqual', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failUnlessEqual" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.failUnlessRaises">
    <p>def <span class="ident">failUnlessRaises</span>(</p><p>*args, **kwargs)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.failUnlessRaises', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.failUnlessRaises" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">deprecated_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
    <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
        <span class="s1">&#39;Please use {0} instead.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">original_func</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span>
        <span class="ne">DeprecationWarning</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">original_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.id">
    <p>def <span class="ident">id</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.id', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.id" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">id</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="k">return</span> <span class="s2">&quot;</span><span class="si">%s</span><span class="s2">.</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">strclass</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodName</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.run">
    <p>def <span class="ident">run</span>(</p><p>self, result=None)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.run', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.run" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">result</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
    <span class="n">orig_result</span> <span class="o">=</span> <span class="n">result</span>
    <span class="k">if</span> <span class="n">result</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
        <span class="n">result</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">defaultTestResult</span><span class="p">()</span>
        <span class="n">startTestRun</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s1">&#39;startTestRun&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">startTestRun</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
            <span class="n">startTestRun</span><span class="p">()</span>
    <span class="n">result</span><span class="o">.</span><span class="n">startTest</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
    <span class="n">testMethod</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodName</span><span class="p">)</span>
    <span class="k">if</span> <span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">,</span> <span class="s2">&quot;__unittest_skip__&quot;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span> <span class="ow">or</span>
        <span class="nb">getattr</span><span class="p">(</span><span class="n">testMethod</span><span class="p">,</span> <span class="s2">&quot;__unittest_skip__&quot;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)):</span>
        <span class="c1"># If the class or method was skipped.</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="n">skip_why</span> <span class="o">=</span> <span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">,</span> <span class="s1">&#39;__unittest_skip_why__&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)</span>
                        <span class="ow">or</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">testMethod</span><span class="p">,</span> <span class="s1">&#39;__unittest_skip_why__&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">))</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_addSkip</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="bp">self</span><span class="p">,</span> <span class="n">skip_why</span><span class="p">)</span>
        <span class="k">finally</span><span class="p">:</span>
            <span class="n">result</span><span class="o">.</span><span class="n">stopTest</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
        <span class="k">return</span>
    <span class="n">expecting_failure_method</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">testMethod</span><span class="p">,</span>
                                       <span class="s2">&quot;__unittest_expecting_failure__&quot;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
    <span class="n">expecting_failure_class</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span>
                                      <span class="s2">&quot;__unittest_expecting_failure__&quot;</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
    <span class="n">expecting_failure</span> <span class="o">=</span> <span class="n">expecting_failure_class</span> <span class="ow">or</span> <span class="n">expecting_failure_method</span>
    <span class="n">outcome</span> <span class="o">=</span> <span class="n">_Outcome</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span> <span class="o">=</span> <span class="n">outcome</span>
        <span class="k">with</span> <span class="n">outcome</span><span class="o">.</span><span class="n">testPartExecutor</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
        <span class="k">if</span> <span class="n">outcome</span><span class="o">.</span><span class="n">success</span><span class="p">:</span>
            <span class="n">outcome</span><span class="o">.</span><span class="n">expecting_failure</span> <span class="o">=</span> <span class="n">expecting_failure</span>
            <span class="k">with</span> <span class="n">outcome</span><span class="o">.</span><span class="n">testPartExecutor</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">isTest</span><span class="o">=</span><span class="bp">True</span><span class="p">):</span>
                <span class="n">testMethod</span><span class="p">()</span>
            <span class="n">outcome</span><span class="o">.</span><span class="n">expecting_failure</span> <span class="o">=</span> <span class="bp">False</span>
            <span class="k">with</span> <span class="n">outcome</span><span class="o">.</span><span class="n">testPartExecutor</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">tearDown</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">doCleanups</span><span class="p">()</span>
        <span class="k">for</span> <span class="n">test</span><span class="p">,</span> <span class="n">reason</span> <span class="ow">in</span> <span class="n">outcome</span><span class="o">.</span><span class="n">skipped</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_addSkip</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">test</span><span class="p">,</span> <span class="n">reason</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_feedErrorsToResult</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">outcome</span><span class="o">.</span><span class="n">errors</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">outcome</span><span class="o">.</span><span class="n">success</span><span class="p">:</span>
            <span class="k">if</span> <span class="n">expecting_failure</span><span class="p">:</span>
                <span class="k">if</span> <span class="n">outcome</span><span class="o">.</span><span class="n">expectedFailure</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_addExpectedFailure</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">outcome</span><span class="o">.</span><span class="n">expectedFailure</span><span class="p">)</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">_addUnexpectedSuccess</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">result</span><span class="o">.</span><span class="n">addSuccess</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">result</span>
    <span class="k">finally</span><span class="p">:</span>
        <span class="n">result</span><span class="o">.</span><span class="n">stopTest</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">orig_result</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
            <span class="n">stopTestRun</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s1">&#39;stopTestRun&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
            <span class="k">if</span> <span class="n">stopTestRun</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
                <span class="n">stopTestRun</span><span class="p">()</span>
        <span class="c1"># explicitly break reference cycles:</span>
        <span class="c1"># outcome.errors -&gt; frame -&gt; outcome -&gt; outcome.errors</span>
        <span class="c1"># outcome.expectedFailure -&gt; frame -&gt; outcome -&gt; outcome.expectedFailure</span>
        <span class="n">outcome</span><span class="o">.</span><span class="n">errors</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
        <span class="n">outcome</span><span class="o">.</span><span class="n">expectedFailure</span> <span class="o">=</span> <span class="bp">None</span>
        <span class="c1"># clear the outcome, no more needed</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span> <span class="o">=</span> <span class="bp">None</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.setUp">
    <p>def <span class="ident">setUp</span>(</p><p>self)</p>
    </div>
    

    
  
    <div class="desc"><p>Hook method for setting up the test fixture before exercising it.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.setUp', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.setUp" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
    <span class="n">nexuscli</span><span class="o">.</span><span class="n">set_target</span><span class="p">(</span><span class="s2">&quot;http://localhost:8083&quot;</span><span class="p">,</span> <span class="n">use_session</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.shortDescription">
    <p>def <span class="ident">shortDescription</span>(</p><p>self)</p>
    </div>
    

    
  
    <div class="desc"><p>Returns a one-line description of the test, or None if no
description has been provided.</p>
<p>The default implementation of this method returns the first line of
the specified test method's docstring.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.shortDescription', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.shortDescription" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">shortDescription</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Returns a one-line description of the test, or None if no</span>
<span class="sd">    description has been provided.</span>
<span class="sd">    The default implementation of this method returns the first line of</span>
<span class="sd">    the specified test method&#39;s docstring.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">doc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_testMethodDoc</span>
    <span class="k">return</span> <span class="n">doc</span> <span class="ow">and</span> <span class="n">doc</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="ow">or</span> <span class="bp">None</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.skipTest">
    <p>def <span class="ident">skipTest</span>(</p><p>self, reason)</p>
    </div>
    

    
  
    <div class="desc"><p>Skip this test.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.skipTest', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.skipTest" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">skipTest</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">reason</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Skip this test.&quot;&quot;&quot;</span>
    <span class="k">raise</span> <span class="n">SkipTest</span><span class="p">(</span><span class="n">reason</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.subTest">
    <p>def <span class="ident">subTest</span>(</p><p>*args, **kwds)</p>
    </div>
    

    
  
    <div class="desc"><p>Return a context manager that will return the enclosed block
of code in a subtest identified by the optional message and
keyword parameters.  A failure in the subtest marks the test
case as failed but resumes execution at the end of the enclosed
block, allowing further test code to be executed.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.subTest', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.subTest" class="source">
    <div class="codehilite"><pre><span></span><span class="nd">@contextlib.contextmanager</span>
<span class="k">def</span> <span class="nf">subTest</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="n">_subtest_msg_sentinel</span><span class="p">,</span> <span class="o">**</span><span class="n">params</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Return a context manager that will return the enclosed block</span>
<span class="sd">    of code in a subtest identified by the optional message and</span>
<span class="sd">    keyword parameters.  A failure in the subtest marks the test</span>
<span class="sd">    case as failed but resumes execution at the end of the enclosed</span>
<span class="sd">    block, allowing further test code to be executed.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span><span class="o">.</span><span class="n">result_supports_subtests</span><span class="p">:</span>
        <span class="k">yield</span>
        <span class="k">return</span>
    <span class="n">parent</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_subtest</span>
    <span class="k">if</span> <span class="n">parent</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
        <span class="n">params_map</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">ChainMap</span><span class="p">(</span><span class="n">params</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">params_map</span> <span class="o">=</span> <span class="n">parent</span><span class="o">.</span><span class="n">params</span><span class="o">.</span><span class="n">new_child</span><span class="p">(</span><span class="n">params</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">_subtest</span> <span class="o">=</span> <span class="n">_SubTest</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">params_map</span><span class="p">)</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span><span class="o">.</span><span class="n">testPartExecutor</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_subtest</span><span class="p">,</span> <span class="n">isTest</span><span class="o">=</span><span class="bp">True</span><span class="p">):</span>
            <span class="k">yield</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span><span class="o">.</span><span class="n">success</span><span class="p">:</span>
            <span class="n">result</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span><span class="o">.</span><span class="n">result</span>
            <span class="k">if</span> <span class="n">result</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">result</span><span class="o">.</span><span class="n">failfast</span><span class="p">:</span>
                <span class="k">raise</span> <span class="n">_ShouldStop</span>
        <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_outcome</span><span class="o">.</span><span class="n">expectedFailure</span><span class="p">:</span>
            <span class="c1"># If the test is expecting a failure, we really want to</span>
            <span class="c1"># stop now and register the expected failure.</span>
            <span class="k">raise</span> <span class="n">_ShouldStop</span>
    <span class="k">finally</span><span class="p">:</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_subtest</span> <span class="o">=</span> <span class="n">parent</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.tearDown">
    <p>def <span class="ident">tearDown</span>(</p><p>self)</p>
    </div>
    

    
  
    <div class="desc"><p>Hook method for deconstructing the test fixture after testing it.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.tearDown', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.tearDown" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">tearDown</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="s2">&quot;Hook method for deconstructing the test fixture after testing it.&quot;</span>
    <span class="k">pass</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.test_daily_difference_average">
    <p>def <span class="ident">test_daily_difference_average</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.test_daily_difference_average', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.test_daily_difference_average" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">test_daily_difference_average</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">ts</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">daily_difference_average</span><span class="p">(</span><span class="s2">&quot;AVHRR_OI_L4_GHRSST_NCEI&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">120</span><span class="p">,</span> <span class="mi">60</span><span class="p">),</span>
                                           <span class="n">datetime</span><span class="p">(</span><span class="mi">2013</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2014</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</span><span class="p">))</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">ts</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_bounding_box">
    <p>def <span class="ident">test_data_in_bounds_with_bounding_box</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_bounding_box', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_bounding_box" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">test_data_in_bounds_with_bounding_box</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">subset</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">subset</span><span class="p">(</span><span class="s2">&quot;MUR-JPL-L4-GLOB-v4.1&quot;</span><span class="p">,</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">149</span><span class="p">,</span> <span class="mi">46</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span>
                             <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
    <span class="k">print</span><span class="p">(</span><span class="n">subset</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_metadata_filter">
    <p>def <span class="ident">test_data_in_bounds_with_metadata_filter</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_metadata_filter', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.test_data_in_bounds_with_metadata_filter" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">test_data_in_bounds_with_metadata_filter</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">subset</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">subset</span><span class="p">(</span><span class="s2">&quot;MUR-JPL-L4-GLOB-v4.1&quot;</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2018</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span>
                             <span class="bp">None</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;id:60758e00-5721-3a6e-bf57-78448bb0aeeb&quot;</span><span class="p">])</span>
    <span class="k">print</span><span class="p">(</span><span class="n">subset</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.test_list">
    <p>def <span class="ident">test_list</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.test_list', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.test_list" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">test_list</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">ds_list</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">dataset_list</span><span class="p">()</span>
    <span class="k">print</span><span class="p">(</span><span class="n">ds_list</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertTrue</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">ds_list</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.test_time_series">
    <p>def <span class="ident">test_time_series</span>(</p><p>self)</p>
    </div>
    

    
  
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.test_time_series', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.test_time_series" class="source">
    <div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">test_time_series</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">ts</span> <span class="o">=</span> <span class="n">nexuscli</span><span class="o">.</span><span class="n">time_series</span><span class="p">((</span><span class="s2">&quot;AVHRR_OI_L4_GHRSST_NCEI&quot;</span><span class="p">,</span> <span class="s2">&quot;MEASURES_SLA_JPL_1603&quot;</span><span class="p">),</span> <span class="n">box</span><span class="p">(</span><span class="o">-</span><span class="mi">150</span><span class="p">,</span> <span class="mi">45</span><span class="p">,</span> <span class="o">-</span><span class="mi">120</span><span class="p">,</span> <span class="mi">60</span><span class="p">),</span>
                              <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</span><span class="p">))</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">ts</span><span class="p">))</span>
</pre></div>

  </div>
</div>

  </div>
  
          <h3>Methods</h3>
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.setUpClass">
    <p>def <span class="ident">setUpClass</span>(</p><p>cls)</p>
    </div>
    

    
  
    <div class="desc"><p>Hook method for setting up class fixture before running tests in the class.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.setUpClass', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.setUpClass" class="source">
    <div class="codehilite"><pre><span></span><span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">setUpClass</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
    <span class="s2">&quot;Hook method for setting up class fixture before running tests in the class.&quot;</span>
</pre></div>

  </div>
</div>

  </div>
  
            
  <div class="item">
    <div class="name def" id="nexuscli.test.nexuscli_test.TestCli.tearDownClass">
    <p>def <span class="ident">tearDownClass</span>(</p><p>cls)</p>
    </div>
    

    
  
    <div class="desc"><p>Hook method for deconstructing the class fixture after running all tests in the class.</p></div>
  <div class="source_cont">
  <p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-nexuscli.test.nexuscli_test.TestCli.tearDownClass', this);">Show source &equiv;</a></p>
  <div id="source-nexuscli.test.nexuscli_test.TestCli.tearDownClass" class="source">
    <div class="codehilite"><pre><span></span><span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">tearDownClass</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
    <span class="s2">&quot;Hook method for deconstructing the class fixture after running all tests in the class.&quot;</span>
</pre></div>

  </div>
</div>

  </div>
  
      </div>
      </div>

  </section>

    </article>
  <div class="clear"> </div>
  <footer id="footer">
    <p>
      Documentation generated by
      <a href="https://github.com/BurntSushi/pdoc">pdoc 0.3.2</a>
    </p>

    <p>pdoc is in the public domain with the
      <a href="http://unlicense.org">UNLICENSE</a></p>

    <p>Design by <a href="http://nadh.in">Kailash Nadh</a></p>
  </footer>
</div>
</body>
</html>
